import Vue from "vue";
import Vuex from 'vuex'
import persistence from "vuex-uniapp-persistence";
import user from "./modules/user";
import getters from "./getters";
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
// 安全区域数据
safeArea: uni.getWindowInfo().safeArea,
// 右上角胶囊按钮数据
capButton: uni.getMenuButtonBoundingClientRect(),
  },
 // mutations: {},
 // actions: {},
 
 plugins: [persistence()],
 getters,
 modules: {
   user,
   address
 }
})

export default store